<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0; padding: 0 }
  #map_canvas { height: 100% }
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize()
{	
	//var marker_array = new Array();
	var infowindow_array = new Array();
	var latlng = new google.maps.LatLng(23.5, 82.5);
     	myOptions = {
     		 	zoom:4,
      			center: latlng,
      			mapTypeId: google.maps.MapTypeId.ROADMAP
    		    };
	map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
	var xmlDoc = null;
	if(window.ActiveXObject) //for IE
	{
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	}
	else if(document.implementation.createDocument) //for Firefox
	{
		xmlDoc = document.implementation.createDocument("","",null);
	}
	else alert("Your browser does not support xml");
	var infowindow = new google.maps.InfoWindow(
      					{ //content: popup,
        				  size: new google.maps.Size(50,50)});  

	var popup;// = new Array();
	if(xmlDoc != null)
	{
		xmlDoc.async = false;
		xmlDoc.load("data.xml");
		var markers = xmlDoc.getElementsByTagName("marker");
                for(i=0;i<markers.length;i++)
		{
			var point = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")));
			popup = markers[i].getAttribute("news");
			var link = markers[i].getAttribute("link");
			//document.write(link);
			//infowindow_array[i] = new google.maps.InfoWindow(
			//		{content: popup,
			//		 size: new google.maps.Size(50,50)});
			//document.write("<h1>" + popup + "</h1>");	
			//infowindow.setContent(popup);
			var randomMarker = new google.maps.Marker({
				position: point,
				map: map,
				title: "nath"});
			randomMarker.html = popup + "<br/><a href=" + link + " target=newtab/>see more</a>"  ;
			google.maps.event.addListener(randomMarker, 'mouseover', function() 
					{
						  
						  //document.write("<h1>"+ popup + "</h1>");
						  infowindow.setContent(this.html);
						  infowindow.open(map,this);
  					});
		}
	}
}

</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>
	
	
